#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand(time(0));
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
       ui->label->setText("okok");
}

//void Widget::on_pushButton_2_clicked()
//{
//    int width = rand() % geometry().width();
//    int height = rand() % geometry().height();
//    ui->pushButton_2->move(width, height);
//}

void Widget::on_pushButton_2_pressed()
{
    int width = rand() % geometry().width();
    int height = rand() % geometry().height();
    ui->pushButton_2->move(width, height);
    ui->label->setText("???");
}
